if (islogin()) {
    $.post({
        url:'../../requests/teacher/scan_namelist.php',
        async:false,
        success:function (data) {
            console.log(data);
            for (var i = 0; i < data.files.length; i++) {
                var dom=" <li class=\"item-content\">\n" +
                    "                        <div class=\"item-inner\">\n" +
                    "                            <div class=\"item-title\">"+data.files[i]+"</div>\n" +
                    "                            <div class=\"item-after\"><a href='../../requests/Files/"+data.teacher+"/namelist/"+data.files[i]+"'>下载<span class=\"icon icon-download\"></span></a></div>\n" +
                    "                        </div>\n" +
                    "                    </li>";
                $('.list-block ul').append(dom);
            }
        }
    });
}
else window.location.href='../../index.html';